import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';

@Entity('member_group')
export class MemberGroup {
  @PrimaryGeneratedColumn({
    name: 'group_id',
    type: 'int',
    comment: '分组id',
  })
  groupId: number;

  @Column({
    name: 'group_name',
    type: 'varchar',
    length: 255,
    nullable: false,
    comment: '分组名称',
  })
  groupName: string;

  @Column({
    name: 'group_desc',
    type: 'varchar',
    length: 255,
    default: '',
    comment: '分组描述',
  })
  groupDesc: string;

  @Column({
    name: 'remark',
    type: 'varchar',
    length: 255,
    default: '',
    comment: '备注',
  })
  remark: string;

  @Column({
    name: 'sort',
    type: 'int',
    default: 250,
    comment: '排序',
  })
  sort: number;

  @Column({
    name: 'is_default',
    type: 'tinyint',
    default: 0,
    comment: '是否默认，1是0否',
  })
  isDefault: number;

  @Column({
    name: 'is_disable',
    type: 'tinyint',
    default: 0,
    comment: '是否禁用，1是0否',
  })
  isDisable: number;

  @Column({
    name: 'is_delete',
    type: 'tinyint',
    default: 0,
    comment: '是否删除，1是0否',
  })
  isDelete: number;

  @Column({
    name: 'create_uid',
    type: 'int',
    default: 0,
    comment: '添加用户id',
  })
  createUid: number;

  @Column({
    name: 'update_uid',
    type: 'int',
    default: 0,
    comment: '修改用户id',
  })
  updateUid: number;

  @Column({
    name: 'delete_uid',
    type: 'int',
    default: 0,
    comment: '删除用户id',
  })
  deleteUid: number;

  @Column({
    name: 'create_time',
    type: 'datetime',
    nullable: true,
    comment: '添加时间',
  })
  createTime: Date;

  @Column({
    name: 'update_time',
    type: 'datetime',
    nullable: true,
    comment: '修改时间',
  })
  updateTime: Date;

  @Column({
    name: 'delete_time',
    type: 'datetime',
    nullable: true,
    comment: '删除时间',
  })
  deleteTime: Date;
}